<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>我的提现记录</title>
		<link rel="stylesheet" type="text/css" href="../../../bangnuo/admin/layui/css/layui.css">
	</head>
	<body style="margin: 20px;">
		<div>
			<form class="layui-form" action="">
				<div>
					<div style="float: left;">
						<div class="layui-form-item">
							<label class="layui-form-label">月份</label>
							<div class="layui-input-block">
								<input type="text" name="dateTime" id="dateTime" required   placeholder="请选择" autocomplete="off" class="layui-input">
							</div>
						</div>
					</div>
					<div style="float: left;">
						<div class="layui-form-item">
							<label class="layui-form-label">状态</label>
							<div class="layui-input-block">
								<select name="city"  >
									<option value="">全部</option>
									<option value="0">审核中</option>
									<option value="1">已驳回</option>
									<option value="2">已打款</option>
								</select>
							</div>
						</div>
					</div>
					<div style="float: left;">
						<div class="layui-form-item">
							<div class="layui-input-block">
								<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
							</div>
						</div>
					</div>
				</div>
			</form>
			<hr />
			<div>
				<table id="demo" lay-filter="test"></table>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../../bangnuo/admin/layui/layui.js"></script>
	<script>
		layui.use(['form','laydate','table'], function() {
			var form = layui.form,
			laydate = layui.laydate,
			table = layui.table;
			
			//日期时间选择器
			laydate.render({ 
			  elem: '#dateTime'
			  ,type: 'datetime'
			});
			
			//监听提交
			form.on('submit(formDemo)', function(data) {
				layer.msg(JSON.stringify(data.field));
				return false;
			});
			
			table.render({
			    elem: '#demo'
			    ,url: 'http://192.168.101.201:8080/order/test' //数据接口
			    ,page: true ,//开启分页
				method: 'post',
				contentType: "application/json;charset=UTF-8",
				response: {
					"statusName": "code",
					"statusCode": 10000,
					"msgName": "message",
					"countName": "total",
					"dataName": "queryResult"
				},
				parseData: function(res) {
					return {
						"code": res.code,
						"message": res.message,
						"total": res.queryResult.total,
						"queryResult": res.queryResult.list
					};
				},
				request: {
					pageName: 'page' //页码的参数名称，默认：page
						,
					limitName: 'size' //每页数据量的参数名，默认：limit
				}
			    ,cols: [[ //表头
			      {field: 'id', title: '月份', sort: true, fixed: 'left'}
			      ,{field: 'username', title: '官方支付宝', sort: true}
			      ,{field: 'sex', title: '官方微信', sort: true}
			      ,{field: 'city', title: '间联通道', sort: true} 
			      ,{field: 'sign', title: '合计', sort: true}
			      ,{field: 'experience', title: '状态', sort: true}
			      ,{field: 'score', title: '备注信息', sort: true}
			      ,{field: 'wealth', title: '申请时间'}
			    ]]
			  });
		});
	</script>
</html>
